package com.whcoding.swagger.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @program: spring-boot-learning
 * @description:
 * @author: whcoding
 * @create: 2022-02-17 15:36
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel("客户实体类")
public class OrmCustomerVO implements Serializable {

	private Long id;

	/**
	 * 客户名称
	 */
	@NotBlank(message = "客户名称不能为空")
	@ApiModelProperty(value = "客户名称",name = "customerName")
	private String customerName;

	/**\
	 * 客户编码
	 * 赋值 默认值为空
	 */
	@ApiModelProperty("客户编码")
	private String customerNo="";

	/**
	 * 客户id
	 */
	@ApiModelProperty(value = "客户id",name ="customerId", example="0")
	private Integer customerId;

	/**
	 * 客户地址
	 */
	@ApiModelProperty("客户地址")
	@Size(max = 100, message = "客户地址长度不符合规范")
	private String customerAddress;

	/**
	 * 客户类型
	 */
	@ApiModelProperty("客户类型")
	private Integer customerType;

	/**
	 * 资产金额
	 */
	@ApiModelProperty("资产金额")
	private BigDecimal customerFund;

	/**
	 * 订单日期
	 */
	@ApiModelProperty("订单日期")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date orderDate;

	/**
	 * 订单号
	 */
	@ApiModelProperty("订单号")
	private String orderNo;

	/**
	 * 订单id
	 */
	@ApiModelProperty("订单id")
	private String orderId;

	/**
	 * 是否有效
	 */
	private Integer isValid;

	/**
	 * 创建时间
	 */
	@ApiModelProperty("创建时间")
	private Date createTime;

	/**
	 * 更新时间
	 */
	private Date updateTime;

	/**
	 * 创建人
	 */
	private Integer createUser;

	/**
	 * 更新人
	 */
	private Integer updateUser;
}
